import { defHttp } from '/@/utils/http/axios';

enum Attendance {
  getAttendance = '/api/attendance/record',
  getAttendancePage = '/api/attendance/rule/record',
  getClockInRecords = '/api/attendance/record/list',
  attendanceExportExcel = '/api/attendance/record/list',

}
/**
 * @description: 考勤打卡
 */
export const attendancePage = (params?: any) => {
  return defHttp.get<any>({ url: Attendance.getAttendancePage, params });
};
export const attendanceList = (params?: any) => {
  return defHttp.get<any>({ url: Attendance.getClockInRecords, params });
};
export const attendanceClockIn = (params?: any) => {
  return defHttp.post<any>({ url: Attendance.getAttendance, params });
};
export const attendanceExportExcel = (params?: any) => {
  return defHttp.download<any>({ url: Attendance.attendanceExportExcel, params }, '打卡记录统计.xls');
};